import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import babel from '@rollup/plugin-babel';
import babelConfig from './babel.config';

export default {
    input: 'src/index.js',
    context: 'window',
    output: [
        {
            file: 'index.iife.js',
            format: 'iife',
            exports: 'auto',
            name: 'iifeModuleName',
            globals: {
                ol: 'ol'
            }
        }
    ],
    plugins: [
        resolve(),
        commonjs(),
        babel({
            ...babelConfig
        })
    ],
    external: [
        'ol'
    ]
};